package it.unibo.refolding.pico;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

public class PicoConstants {

	/**
	 * Looks like before doing anything the AFM waits for about 24 ms.
	 */
	public static final double DEAD_TIME_S = 0.017;
	
	/**
	 * Here we try to approximate the "actual" velocity.
	 */
	public static final double MAX_VELOCITY_M_PER_S = 21.5e-6;
	
	/**
	 * Max typeable with demo piezo is 515e-6 m/s, with ours it was 547e-6 m/s instead.
	 * Here let's make it 1 mm/s, just in case.
	 */
	public static final double MAX_TYPEABLE_VELOCITY_M_PER_S = 1e-3;
	
	public static final Map<String, Double> VELOCITY_MULTIPLIERS = createVelocityMultipliersMap();

	private static Map<String, Double> createVelocityMultipliersMap() {
		// No need for google collections dependency.
		Map<String, Double> map = new HashMap<String, Double>();
		map.put("196PF", 1090e-9 / 19.9435);
		map.put("219PF", 1090e-9 / 21.1634);
		return Collections.unmodifiableMap(map);
	}
}
